module.exports = app => {
    const {
      INTEGER, DATE, STRING, TEXT
    } = app.Sequelize;
const Ship = app.model.define('Ship', {
    id: { type: INTEGER, primaryKey: true, autoIncrement: true },
    name:{ type: STRING(36),field:'name' },
    crewCapacity: { type: INTEGER, field: 'crewCapacity' },
    amountOfSails: { type: INTEGER, field: 'amountOfSails'}
  }, { timestamps: false,tableName:'ship' });

  // Ship.associate=()=>{
  //   app.model.Ship.belongsTo(app.model.Captain, {
  //       foreignKey: 'captain_id',
  //       targetKey: 'id',
  //     });
  // }
 return Ship
}